#ifndef __SNOWBALL_H
#define __SNOWBALL_H

/*
	
	FILENAME
	What is in this file?
	OpenGL Game Programming
	Author: Kevin Hawkins
	Date: XX/XX/XXXX
	Description:

*/

#include "entity.h"

class CExplosion;
class CTexture;
class CPlayer;

class CSnowBall : public CEntity
{
private:
	void SetupExplosionTexture();
	GLUquadricObj *sphere;

protected:
	void OnAnimate(scalar_t deltaTime);
	void OnCollision(CObject *collisionObject);
	void OnDraw(CCamera *camera);
	void OnPrepare();

	CPlayer *player;

public:
	// direction snowball points
	float pitch;
	float distanceTravel;	// distance snowball has travelled
	float gravity;
	CVector forward;		// forward vector of snowball (for pitch/dir)
	bool isExplosion;
	bool usedUp;

	CTexture *explosionTex;
	CExplosion *explosion;

	CSnowBall();
	~CSnowBall();

	void Load();
	void Unload();

	void SetPlayer(CPlayer *p) { player = p; }

	bool IsUsedUp() { return usedUp; }
	void SetUsedUp(bool usedUp) { this->usedUp = usedUp; }
};

#endif